#include <bits/stdc++.h>
using namespace std;

int R[2000001], n, r[1000001];
char a[2000002];

typedef unsigned long long ull;
ull k;
const ull MOD = 19930726;

ull quick_pow(ull x, ull n, ull m)
{
    ull res = 1;
    x %= m;
    while (n > 0)
    {
        if (n & 1)
            res = res * x % m;
        x = x * x % m;
        n >>= 1;
    }
    return res;
}

int main()
{
    cin >> n >> k;
    cin >> (a + 1);
    a[0] = '$';
    int p = 0, mx = 0;
    for (int i = 1; i <= n; i++)
    {
        if (mx >= i)
            R[i] = min(R[2 * p - i], mx - i + 1);
        else
            R[i] = 1;
        while (a[i + R[i]] == a[i - R[i]])
            R[i]++;
        if (i + R[i] > mx)
            p = i, mx = i + R[i] - 1;
    }

    for (int i = 1; i <= n; i++)
        r[R[i] * 2 - 1]++;

    ull ans = 1, cnt = 0, sum = 0;
    for (int i = n; i >= 1 && cnt < k; i--)
    {
        if (i % 2 == 0)
            continue;
        sum += r[i];
        ull add = min(k - cnt, sum);
        ans = (ans * quick_pow(i, add, MOD)) % MOD;
        cnt += add;
    }
    if (cnt == k)
        cout << ans << endl;
    else
        cout << -1 << endl;
    return 0;
}